package sm;

import org.hyperic.sigar.SigarException;

public class SMDisk extends Basic{

    /**
     * @param args
     * @throws SigarException 
     */
    public long getRead(String name) throws SigarException{
        return sigar.getDiskUsage(name).getReads();
    }
    public long getDirSocketByFolder(String forlder) throws SigarException{
        return sigar.getDirUsage(forlder).getSockets();
    }
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        SMDisk d = new SMDisk();
        try {
            System.out.println(d.getRead("D:/self/DB"));
            System.out.println(d.getDirSocketByFolder("D:/self/DB/"));
        } catch (SigarException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

}
